//
// 设备参数设置界面
//



import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Item {
    width: rootWidth
    height: rootHeight

    A_NumberKeyboard{
        id: mechineParameterKeyboard
        isDirectOverwrite: false
    }

    Component.onCompleted: {
        Cpp_PLC.QML_CurrentPage = 12;
        // Cpp_PLC.write_Modbus_RTU_Hold_16(48,"5")
    }

    Rectangle{
        width: rootWidth
        height: 1875
        color: "transparent"
        border.width: 1

        Item{
            anchors.top: parent.top
            anchors.topMargin: 50
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("原 点 值")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.OriginValue


            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(210,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(210,"0")
            //         }
            //         else if(Number(inputData) > 100000)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(210,"100000")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(210,inputData)
            //         }
            //     }
            // }

            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.OriginValue
                minValue: 0
                maxValue: 100000
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(210,value)
                }

            }


        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 150
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("定位速度")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Location_Speed

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(206,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(206,"0")
            //         }
            //         else if(Number(inputData) > 100000)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(206,"100000")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(206,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Location_Speed
                minValue: 0
                maxValue: 100000
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(206,value)
                }

            }

        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 250
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("手动速度")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Manual_Speed

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(1392,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1392,"0")
            //         }
            //         else if(Number(inputData) > 500)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1392,"500")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1392,inputData)
            //         }

            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Manual_Speed
                minValue: 0
                maxValue: 500
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(1392,value)
                }

            }

        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 350
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("压紧动作时间")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Impact_Active_Time + " s"
            //     onInputFinished: {
            //         // console.log(inputData)

            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1280,"0")
            //         }
            //         else if(Number(inputData) > 5)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1280,"5")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1280,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Impact_Active_Time + " s"
                minValue: 0
                maxValue: 5
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(1280,value)
                }

            }


        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 450
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150
            visible: Cpp_PLC.AutoObserveState

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("料高检测时间")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.MaterialHeight_ObserveTime + " s"

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(1288,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1288,"0")
            //         }
            //         else if(Number(inputData) > 20)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1288,"20")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1288,inputData)
            //         }

            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.MaterialHeight_ObserveTime + " s"
                minValue: 0
                maxValue: 20
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(1288,value)
                }

            }


        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 550
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150
            visible: Cpp_PLC.AutoObserveState

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("料高磁尺当量")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.MaterialHeight_DisplaceMent

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(1290,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1290,"0")
            //         }
            //         else if(Number(inputData) > 100000)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1290,"100000")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1290,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.MaterialHeight_DisplaceMent
                minValue: 0
                maxValue: 100000
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(1290,value)
                }

            }

        }


        Item{
            anchors.top: parent.top
            anchors.topMargin: 650
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150
            visible: Cpp_PLC.MechineChangeAngleMode

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("45度安全位置")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Angle45SafeDistance

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(1394,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1394,"0")
            //         }
            //         else if(Number(inputData) > 10000)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1394,"10000")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1394,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Angle45SafeDistance
                minValue: 0
                maxValue: 10000
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(1394,value)
                }

            }

        }


        Item{
            anchors.top: parent.top
            anchors.topMargin: 750
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("左锯工进时间")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.LeftSaw_Out_Time + " s"

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(232,inputData)

            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(232,"0")
            //         }
            //         else if(Number(inputData) > 20)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(232,"20")
            //         }
            //         else
            //         {
            //            Cpp_PLC.write_Modbus_RTU_Hold_32(232,inputData)
            //         }
            //     }
            // }

            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.LeftSaw_Out_Time + " s"
                minValue: 0
                maxValue: 20
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(232,value)
                }

            }



        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 850
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("右锯工进时间")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.RightSaw_Out_Time + " s"

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(234,inputData)

            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(234,"0")
            //         }
            //         else if(Number(inputData) > 20)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(234,"20")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(234,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.RightSaw_Out_Time + " s"
                minValue: 0
                maxValue: 20
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(234,value)
                }

            }


        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 950
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("左锯45度补偿")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.DoubleSaws_45_Compensate

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(1384,inputData)
            //         if(Number(inputData) < -150 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1384,"-150")
            //         }
            //         else if(Number(inputData) > 150)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1384,"150")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(1384,inputData)
            //         }
            //     }
            // }

            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.DoubleSaws_45_Compensate
                minValue: -150
                maxValue: 150
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(1384,value)
                }

            }


        }


        Item{
            anchors.top: parent.top
            anchors.topMargin: 1050
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("右锯45度补偿")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.SingleSaw_45_Compensate

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(396,inputData)
            //         if(Number(inputData) < -150 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(396,"-150")
            //         }
            //         else if(Number(inputData) > 150)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(396,"150")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(396,inputData)
            //         }

            //     }
            // }

            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.SingleSaw_45_Compensate
                minValue: -150
                maxValue: 150
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(396,value)
                }

            }


        }


        Item{
            anchors.top: parent.top
            anchors.topMargin: 1150
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("左右吹气时间")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Blow_Time + " s"

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_16(374,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_16(374,"0")
            //         }
            //         else if(Number(inputData) > 20)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_16(374,"20")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_16(374,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Blow_Time + " s"
                minValue: 0
                maxValue: 20
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_16(374,value)
                }

            }

        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 1250
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150
            visible: Cpp_PLC.PowerOffMode

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("电磁阀断电延时")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.PowerOff_Delay_Time + " s"

            //     onInputFinished: {
            //         // console.log(inputData)
            //         // Cpp_PLC.write_Modbus_RTU_Hold_32(238,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(238,"0")
            //         }
            //         else if(Number(inputData) > 20)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(238,"20")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(238,inputData)
            //         }
            //     }
            // }


            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.PowerOff_Delay_Time + " s"
                minValue: 0
                maxValue: 20
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                    Cpp_PLC.write_Modbus_RTU_Hold_32(238,value)
                }

            }

        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 1350
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150
            visible: Cpp_PLC.M_506

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("微动距离")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Tiny_Move_Distance + "mm"

            //     onInputFinished: {
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(660,"0")
            //         }
            //         else if(Number(inputData) > 10000)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(660,"10000")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(660,inputData)
            //         }
            //     }
            // }

            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Tiny_Move_Distance + "mm"
                minValue: 0
                maxValue: 10000
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                   Cpp_PLC.write_Modbus_RTU_Hold_32(660,value)
                }

            }

        }

        Item{
            anchors.top: parent.top
            anchors.topMargin: 1450
            anchors.horizontalCenter: parent.horizontalCenter
            width: 700
            height: 150
            // visible: Cpp_PLC.PowerOffMode

            A_Label{
                anchors.left: parent.left
                anchors.leftMargin: 50
                anchors.verticalCenter: parent.verticalCenter
                label_Data: qsTr("左拉料延迟")
            }

            // A_TextInput{
            //     anchors.left: parent.left
            //     anchors.leftMargin: 350
            //     anchors.verticalCenter: parent.verticalCenter
            //     inputWidth: 250
            //     showData: Cpp_PLC.Left_Pull_Delay + " s"

            //     onInputFinished: {
            //         // // console.log(inputData)
            //         // // Cpp_PLC.write_Modbus_RTU_Hold_32(238,inputData)
            //         if(Number(inputData) < 0 )
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(670,"0")
            //         }
            //         else if(Number(inputData) > 20)
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(670,"5")
            //         }
            //         else
            //         {
            //             Cpp_PLC.write_Modbus_RTU_Hold_32(670,inputData)
            //         }
            //     }
            // }

            A_NumberInput{
                anchors.left: parent.left
                anchors.leftMargin: 350
                anchors.verticalCenter: parent.verticalCenter
                inputWidth: 250
                text: Cpp_PLC.Left_Pull_Delay + " s"
                minValue: 0
                maxValue: 5
                keyboard: mechineParameterKeyboard

                onEditingFinished: function(value) {
                   Cpp_PLC.write_Modbus_RTU_Hold_32(670,value)
                }

            }


        }




    }    


    // Component.onCompleted: {
    //     console.log("生成！！ - 设备参数设置界面")
    // }

    // Component.onDestruction: {
    //     console.log("销毁 - 设备参数设置界面")
    // }
}
